#include <stdlib.h>
#include <time.h>
#include <stdio.h>
#include <sys/timeb.h>

int main(void)
{
    sleep(5);
    printf("IN SENDER: sending SIGUSR1 to process\n");
    /* printf("IN SENDER: time (in seconds) is %ld\n", (long) time(NULL)); */

    /* struct timespec res; */
    /* clock_gettime(CLOCK_REALTIME, &res); */

    struct timeval res;
    gettimeofday(&res, NULL);
    printf("IN SENDER: time is %ld(sec) %d(usec)\n", (long)res.tv_sec, (int) res.tv_usec);

    struct timeb mt;
    ftime(&mt);
    printf("IN SENDER: time is %ld(sec) %d(msec)\n", (long)mt.time, mt.millitm);

    system("pkill -USR1 receiver.out");
    return 0;
}
